<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="青柠主机控制面板">
<meta name="description" content="青柠主机控制面板。">
<meta name="author" content="yinq">
<title>首页 - 青柠主机控制面板</title>
<link rel="shortcut icon" type="image/x-icon" href="">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<!-- 基础样式库 -->
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/js/bootstrap-multitabs/multitabs.min.css">
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/style.min.css">
<!-- 功能插件样式 -->
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/example/js/jquery-confirm/jquery-confirm.min.css">
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/example/css/style.min.css">
</head>
<style>
    .icon {
        width: 1em;
        height: 1em;
        vertical-align: -0.15em;
        fill: currentColor;
        overflow: hidden;
    }
  #logo a {
      font-size: 22px;
      line-height: 68px;
      white-space: nowrap;
      color: #4d5259;
  }
  [data-logobg*='color_'] #logo a {
      color: #fff;
  }
  @media (min-width: 1024px) {
    .lyear-layout-sidebar.lyear-aside-open #logo a {
        display: block;
        width: 45px;
        height: 68px;
        letter-spacing: 3px;
        margin: 0 auto;
        overflow: hidden;
        text-align: center;
    }

    .lyear-layout-sidebar-close .lyear-layout-sidebar:hover #logo a {
        width: 100%;
        margin: 0;
        letter-spacing: 0px;
    }
  }
  </style>
<body class="lyear-index">
  <div class="lyear-layout-web">
    <div class="lyear-layout-container">
      <!--左侧导航-->
      <aside class="lyear-layout-sidebar">

         <!-- logo -->
      <div id="logo" class="sidebar-header">
        <a href="/"><img  style="width: 100%;height: 80%;" src="{{cdn}}/static/image/logo.png"/></a>
      </div>
        <div class="lyear-layout-sidebar-info lyear-scroll">

          <nav class="sidebar-main">

          <ul class="nav-drawer">
            <li class="nav-item active" >
              <a class="multitabs" href="/main" id="default-page">
                <i ><svg class="icon"  style="font-size: 25px;" aria-hidden="true"><use xlink:href="#icon-shouye"></use></svg></i>
                <span >后台首页</span>
              </a>
            </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)">
                <i ><svg class="icon"  style="font-size: 25px;" aria-hidden="true"><use xlink:href="#icon-a-007_wenjianguanli"></use></svg></i>
                <span>文件管理</span>
              </a>
              <ul class="nav nav-subnav">
                <li> <a class="multitabs " href="/fife/path?fife_name=">在线文件管理</a> </li>

              </ul>
            </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)">
                <i ><svg class="icon"  style="font-size: 23px;" aria-hidden="true"><use xlink:href="#icon-php"></use></svg></i>
                <span>PHP网站</span>
              </a>
              <ul class="nav nav-subnav">
                <li> <a class="multitabs" href="/dns/">域名绑定</a> </li>
                <li> <a class="multitabs" href="/switch_directory/">切换网站目录</a> </li>
                <li> <a class="multitabs" href="/GetRewriteList/">设置伪静态</a> </li>
                <li> <a class="multitabs" href="/GetIndex/">默认文档</a> </li>

              </ul>
            </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)">
                <i ><svg class="icon"  style="font-size: 25px;" aria-hidden="true"><use xlink:href="#icon-docker"></use></svg></i>
                <span>docker应用商店</span>
              </a>
              <ul class="nav nav-subnav">
                <li> <a class="multitabs " href="/docker/docker">容器管理</a> </li>
                <li> <a class="multitabs " href="/docker/docker_shop">商店</a> </li>

              </ul>
            </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)">
                <i ><svg class="icon"  style="font-size: 20px;" aria-hidden="true"><use xlink:href="#icon-gaojishezhi"></use></svg></i>
                <span>高级</span>
              </a>
              <ul class="nav nav-subnav">
                <li> <a class="multitabs" href="/ssl/">SSL证书</a> </li>
    

                <li> <a class="multitabs" href="/reverse_proxy/">反向代理</a> </li>
                <li> <a class="multitabs" href="http://74.48.78.220:888/phpmyadmin_fa86d38daa3da8a5/" >SQL管理</a> </li>
                <li> <a class="multitabs" href="/traffic/logs">日志</a> </li>

              </ul>

        </nav>

        <div class="sidebar-footer">
          <p class="copyright">
            <span>Copyright &copy; 2024. </span>
            <a target="_blank" href="">{{user}}</a>
            <span> by qingning</span>
          </p>
        </div>
      </div>

    </aside>
    <!--End 左侧导航-->

    <!--头部信息-->
    <header class="lyear-layout-header">

      <nav class="navbar">
        
        <div class="navbar-left">
          
          <div class="lyear-aside-toggler">
            
            <span class="lyear-toggler-bar"></span>
            <span class="lyear-toggler-bar"></span>
            <span class="lyear-toggler-bar"></span>
           
          </div>
          
        </div>
        
        <ul class="navbar-right d-flex align-items-center">
          <span id="linux"></span>&nbsp;&nbsp;&nbsp;
          <span id="sysinfo"></span>&nbsp;&nbsp;&nbsp;
          <span id="sql"></span>&nbsp;&nbsp;&nbsp;
          <!--切换主题配色-->
		  <li class="dropdown dropdown-skin">
		    <span data-bs-toggle="dropdown" class="icon-item">
              <i class="mdi mdi-palette fs-5"></i>
            </span>
			<ul class="dropdown-menu dropdown-menu-end" data-stopPropagation="true">
              <li class="lyear-skin-title"><p>主题</p></li>
              <li class="lyear-skin-li clearfix">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="site_theme" id="site_theme_1" value="default" checked="checked">
                  <label class="form-check-label" for="site_theme_1"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="site_theme" id="site_theme_2" value="translucent-green">
                  <label class="form-check-label" for="site_theme_2"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="site_theme" id="site_theme_3" value="translucent-blue">
                  <label class="form-check-label" for="site_theme_3"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="site_theme" id="site_theme_4" value="translucent-yellow">
                  <label class="form-check-label" for="site_theme_4"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="site_theme" id="site_theme_5" value="translucent-red">
                  <label class="form-check-label" for="site_theme_5"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="site_theme" id="site_theme_6" value="translucent-pink">
                  <label class="form-check-label" for="site_theme_6"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="site_theme" id="site_theme_7" value="translucent-cyan">
                  <label class="form-check-label" for="site_theme_7"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="site_theme" id="site_theme_8" value="dark">
                  <label class="form-check-label" for="site_theme_8"></label>
                </div>
              </li>
			  <li class="lyear-skin-title"><p>LOGO</p></li>
			  <li class="lyear-skin-li clearfix">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="logo_bg" id="logo_bg_1" value="default" checked="checked">
                  <label class="form-check-label" for="logo_bg_1"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="logo_bg" id="logo_bg_2" value="color_2">
                  <label class="form-check-label" for="logo_bg_2"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="logo_bg" id="logo_bg_3" value="color_3">
                  <label class="form-check-label" for="logo_bg_3"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="logo_bg" id="logo_bg_4" value="color_4">
                  <label class="form-check-label" for="logo_bg_4"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="logo_bg" id="logo_bg_5" value="color_5">
                  <label class="form-check-label" for="logo_bg_5"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="logo_bg" id="logo_bg_6" value="color_6">
                  <label class="form-check-label" for="logo_bg_6"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="logo_bg" id="logo_bg_7" value="color_7">
                  <label class="form-check-label" for="logo_bg_7"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="logo_bg" id="logo_bg_8" value="color_8">
                  <label class="form-check-label" for="logo_bg_8"></label>
                </div>
			  </li>
			  <li class="lyear-skin-title"><p>头部</p></li>
			  <li class="lyear-skin-li clearfix">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="header_bg" id="header_bg_1" value="default" checked="checked">
                  <label class="form-check-label" for="header_bg_1"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="header_bg" id="header_bg_2" value="color_2">
                  <label class="form-check-label" for="header_bg_2"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="header_bg" id="header_bg_3" value="color_3">
                  <label class="form-check-label" for="header_bg_3"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="header_bg" id="header_bg_4" value="color_4">
                  <label class="form-check-label" for="header_bg_4"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="header_bg" id="header_bg_5" value="color_5">
                  <label class="form-check-label" for="header_bg_5"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="header_bg" id="header_bg_6" value="color_6">
                  <label class="form-check-label" for="header_bg_6"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="header_bg" id="header_bg_7" value="color_7">
                  <label class="form-check-label" for="header_bg_7"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="header_bg" id="header_bg_8" value="color_8">
                  <label class="form-check-label" for="header_bg_8"></label>
                </div>
			  </li>
			  <li class="lyear-skin-title"><p>侧边栏</p></li>
			  <li class="lyear-skin-li clearfix">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="sidebar_bg" id="sidebar_bg_1" value="default" checked="checked">
                  <label class="form-check-label" for="sidebar_bg_1"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="sidebar_bg" id="sidebar_bg_2" value="color_2">
                  <label class="form-check-label" for="sidebar_bg_2"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="sidebar_bg" id="sidebar_bg_3" value="color_3">
                  <label class="form-check-label" for="sidebar_bg_3"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="sidebar_bg" id="sidebar_bg_4" value="color_4">
                  <label class="form-check-label" for="sidebar_bg_4"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="sidebar_bg" id="sidebar_bg_5" value="color_5">
                  <label class="form-check-label" for="sidebar_bg_5"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="sidebar_bg" id="sidebar_bg_6" value="color_6">
                  <label class="form-check-label" for="sidebar_bg_6"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="sidebar_bg" id="sidebar_bg_7" value="color_7">
                  <label class="form-check-label" for="sidebar_bg_7"></label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" name="sidebar_bg" id="sidebar_bg_8" value="color_8">
                  <label class="form-check-label" for="sidebar_bg_8"></label>
                </div>
			  </li>
		    </ul>
		  </li>
          <!--End 切换主题配色-->
          <!--个人头像内容-->
          <li class="dropdown">
            <a href="javascript:void(0)" data-bs-toggle="dropdown" class="dropdown-toggle">
              <img class="avatar-md rounded-circle" src="{{cdn}}/static/v5/images/users/avatar.jpg" alt="123" />
              <span style="margin-left: 10px;">{{user}}</span>
            </a>
            <ul class="dropdown-menu dropdown-menu-end">

              <li>
                <a class="dropdown-item" href="/logout">
                  <i class="mdi mdi-logout-variant"></i>
                  <span>退出登录</span>
                </a>
              </li>
            </ul>
          </li>
          <!--End 个人头像内容-->
        </ul>
<div id="comm" style="display:none;">{{ Comm }}</div>
      </nav>

    </header>
    <!--End 头部信息-->

    <!--页面主要内容-->
    <main class="lyear-layout-content">

      <div id="iframe-content"></div>

    </main>

    <!--End 页面主要内容-->
  </div>
</div>

    <!-- jQuery -->
    <script type="text/javascript" src="{{cdn}}/static/v5/js/jquery.min.js"></script>
    <script>
    // 保存jQuery引用，确保嵌入页面可以访问
    window.$j = jQuery.noConflict();
    // 同时保持$符号可用，以兼容第三方库
    window.$ = jQuery;
    
    // 确保在iframe中也能访问到jQuery
    if (window.parent && window.parent !== window) {
        window.parent.$j = window.$j;
        window.parent.$ = window.$;
    }
    </script>
    <script type="text/javascript" src="{{cdn}}/static/v5/js/popper.min.js"></script>
    <script type="text/javascript" src="{{cdn}}/static/v5/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="{{cdn}}/static/v5/js/perfect-scrollbar.min.js"></script>
    <script type="text/javascript" src="{{cdn}}/static/v5/js/bootstrap-multitabs/multitabs.min.js"></script>
    <script type="text/javascript" src="{{cdn}}/static/v5/js/jquery.cookie.min.js"></script>
    <script type="text/javascript" src="{{cdn}}/static/v5/js/index.min.js"></script>
    <!-- 对话框插件js -->
    <script type="text/javascript" src="{{cdn}}/static/v5/example/js/layer/layer.js"></script>
    <script type="text/javascript" src="{{cdn}}/static/js/iconfont.js"></script>
    <!-- 对话框插件js -->
    <script type="text/javascript" src="{{cdn}}/static/v5/js/jquery-confirm/jquery-confirm.min.js"></script>
    <!-- 移除了main.min.js的重复引用，避免与嵌入页面冲突 -->
    <script type="text/javascript">
     // 获取系统信息
    $j.ajax({
        url: "/main/system_info",
        type: "POST",
        success: function (response) {
          if (response == 'Ubuntu') {
                // 改变sysinfo内容
                document.getElementById("linux").innerHTML = '<svg class="icon"  style="font-size: 10px;" aria-hidden="true"><use xlink:href="#icon-Ubuntu"></use></svg>&nbsp;<span style="color: #CC6600 ;">Ubuntu</span>'
            }else if (response == 'CentOS') {
                // 改变sysinfo内容
                document.getElementById("linux").innerHTML = '<svg class="icon"  style="font-size: 10px;" aria-hidden="true"><use xlink:href="#icon-centos"></use></svg>&nbsp;CentOS'
            }else if (response == 'Debian') {
                // 改变sysinfo内容
                document.getElementById("linux").innerHTML = '<svg class="icon"  style="font-size: 10px;" aria-hidden="true"><use xlink:href="#icon-deepin"></use></svg>&nbsp;<span style="color: #00BBFF ;">Debian</span>'
            }
        },
        error: function (xhr, status, error) {
            console.log(error);
        }
    });
     // 获取nginx状态
    $j.ajax({
        url: "/main/get_soft_find",
        type: "POST",
        data: {
            'sName': 'nginx',
        },
        success: function (response) {
            if (response == true) {
                // 改变sysinfo内容
                document.getElementById("sysinfo").innerHTML = '<svg class="icon"  style="font-size: 10px;" aria-hidden="true"><use xlink:href="#icon-NGINX"></use></svg>&nbsp;<span style="color: green;">运行中</span>'
            }
            if (response == false) {
                // 改变sysinfo内容
                document.getElementById("sysinfo").innerHTML = '<svg class="icon"  style="font-size: 10px;" aria-hidden="true"><use xlink:href="#icon-NGINX"></use></svg>&nbsp;<span style="color: red;">未运行</span>'
            }
            
        },
        error: function (xhr, status, error) {
            console.log(error);
        }
    });
     // 获取数据库状态
     $j.ajax({
        url: "/main/get_soft_find",
        type: "POST",
        data: {
            'sName': 'mysql',
        },
        success: function (response) {
            if (response == true) {
                // 改变sysinfo内容
                document.getElementById("sql").innerHTML ='<svg class="icon"  style="font-size: 10px;" aria-hidden="true"><use xlink:href="#icon-mysql"></use></svg>&nbsp;<span style="color: #77DDFF;">运行中</span>'
            }
            if (response == false) {
                // 改变sysinfo内容
                document.getElementById("sql").innerHTML ='<svg class="icon"  style="font-size: 10px;" aria-hidden="true"><use xlink:href="#icon-mysql"></use></svg>&nbsp;<span style="color: red;">未运行</span>'
            }
            
        },
        error: function (xhr, status, error) {
            console.log(error);
        }
    });

    
  </script>
</body>
</html>
